class RadacctsController < ApplicationController

  def index
    if params[:user]
      @radaccts = Radacct.where("username = ?", params[:user]).page(params[:page]).per(10)
    else
      @radaccts = Radacct.page(params[:page]).per(10)
    end
  end

  def onlines
    @radaccts = Radacct.online_users.page(params[:page]).per(10)
  end
end
